"""
词源选择-界面布局
"""
from PyQt5 import QtCore, QtGui, QtWidgets


def wordsSource_widget():
    # 创建词源的组件及布局
    wordsSource_widget = QtWidgets.QWidget()
    wordsSource_layout = QtWidgets.QGridLayout()

    # 占位组件
    wordsSource_label0 = QtWidgets.QPushButton()
    # self.wordsSource_label0.setStyleSheet("background-color:blue;")
    wordsSource_label0.setFlat(True)
    wordsSource_label0.setEnabled(False)

    # 选词标签
    wordsSource_label1 = QtWidgets.QPushButton("选词")
    wordsSource_label1.setStyleSheet("color:blue;")
    wordsSource_label1.setFlat(True)
    wordsSource_label1.setEnabled(False)

    # TOP20W词源选择
    wordsSource_button1 = QtWidgets.QPushButton("TOP20W")
    wordsSource_button1.setObjectName("wordsSource_button1")

    # test测试词源选择
    wordsSource_button2 = QtWidgets.QPushButton("Test")
    wordsSource_button1.setObjectName("wordsSource_button2")

    # 布局
    wordsSource_layout.addWidget(wordsSource_label1, 0, 0)
    wordsSource_layout.addWidget(wordsSource_button1, 1, 0)
    wordsSource_layout.addWidget(wordsSource_button2, 2, 0)
    wordsSource_layout.addWidget(wordsSource_label0, 9, 0, 5, 1)

    wordsSource_widget.setLayout(wordsSource_layout)

    return wordsSource_widget
